<template>
	<!--  物流详情 -->
	<view>
		<view class="list bg-white">
			<view v-for="(item,index) in goods.goods" :key="index" class="list_item flex flex-wrap " @click="handlenavigate(index)">
				<image :src="url+item.main_image" mode=""></image>
				<view class="text_div">
					<view class="title">
						<text>{{item.title}}</text>
					</view>
					<view class="money flex-cb">
						<text>原价:￥{{item.price}}</text>
						<text class="vip"> 积分最多抵扣￥{{item.point_price}}</text>
					</view>
					<view class="flex-cb">
						<view style="color: #999;font-size: 30rpx;">X{{item.number}}</view>
						<view class="jifeng">会员价:￥{{item.vip_price}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="foot">
			<view class="position_div" v-for="(item,index) in Wldata" :key="index">
				<view class="text">{{item.text}}</view>
				<view class="time">{{item.time}}</view>
				<view class="position" v-if="index == isshow">
					<image src="/static/pageA/dd_icon_d.png" mode=""></image>
				</view>
				<view class="div" v-else></view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isshow:0,
				openid:'',
				access_token:'',
				url:'',
				u:'',//是否是用户端
				goods:'',
				Wldata:[
					{
						text:'客户已签收',
						time:'10.10 10:00'
					},
					{
						text:'您的包裹已到达徐州市',
						time:'10.10 15:00'
					},
					{
						text:'您的包裹已到达淮安，正等待揽收',
						time:'10.10 10:00'
					},
					{
						text:'您的包裹已到达南京市',
						time:'10.10 10:00'
					},
					
					{
						text:'已发货',
						time:'10.10 10:00'
					},
					
					
					
				]
			};
		},
		onLoad(e) {
			this.url = this.$base
			this.u = e.u
			this.openid = uni.getStorageSync('userinfo').openid
			this.access_token = uni.getStorageSync('access_token')
			this.goods = JSON.parse(e.e)
			
			// uni.request({
			// 	url:'https://api.weixin.qq.com/cgi-bin/express/delivery/open_msg/query_follow_trace?access_token='+this.access_token,
			// 	method:"POST",
			// 	data:{
			// 	  "openid":this.openid,
			// 	  "waybill_id":this.goods.express_number,
			// 	  // "sender_phone":this.goods.address[0].phone ,
			// 	  "receiver_phone":'17388555785',//this.goods.address[0].phone ,
			// 	  // trans_id:this.
			// 	  "goods_info":{
			// 		"detail_list":[
			// 		 {
			// 		   "goods_name":"测试名字2",
			// 		   "goods_img_url":"/pageA/order/logistics"
			// 		 }
			// 		]
			// 	  }
			// 	}
			// })
		}
	}
</script>

<style lang="scss">
.list{
	width: 706rpx;
	height: auto;
	margin: 10rpx auto;
	border-radius: 20rpx;
}
.list_item{
	padding: 26rpx 20rpx 31rpx 27rpx;
	font-size: 28rpx;
	image{
		width: 136rpx;height: 136rpx;
		border-radius: 10rpx;
	}
	.text_div{
		flex: 1;
		margin-left: 22rpx;
		.title{
			text{
				font-weight: bold;
				color: #333;
			}
		}
		.money{
			margin-top: 20rpx;
			height: 40rpx;
			.vip{
				color: #FF6F10;
				font-size: 24rpx;
			}
		}
		.jifeng{
			color: #FF2E2E;
			font-size: 24rpx;
		}
	}
}
.foot{
	width: 710rpx;
	height: auto;
	background: #FFFFFF;
	border-radius: 10rpx;
	margin: auto;
	padding:  35rpx 45rpx;
	padding-bottom: 0;
	.position_div{
		height: 140rpx;
		width: 100%;
		padding-left: 35rpx;
		color: #000;
		border-left: solid 1rpx #DEDEDE;
		position: relative;
		.text{
			height: 40rpx;
			font-size: 28rpx;
			font-weight: bold;
		}
		.time{
			font-size: 24rpx;
			font-weight: 500;
			margin-top: 6rpx;
		}
		.position,.div{
			position: absolute;
			left: -15rpx;
			top: 0;
			z-index: 1;
			image{
				width: 30rpx;height: 30rpx;
			}
		}
		.div{
			width: 20rpx;
			height: 20rpx;
			border-radius: 50%;
			background: #DEDEDE;
			left: -10rpx;
		}
	}
	.position_div:nth-last-of-type(1){
		border: none;
	}
}
</style>
